package com.core.system.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Date;

/**
 * 角色
 */
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class RoleDto implements Serializable {
	/** 创建时间 */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private Date createTime;
	/** 描述 */
    @Length(max =100 ,message = "长度不能超过100位")
    @NotEmpty(message = "描述必填")
	private String desc;
	/** id */
	private String id;
	/** 角色 */
    @Length(max =50 ,message = "长度不能超过50位")
    @NotEmpty(message = "角色必填")
	private String name;

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	public Date getCreateTime() {
		return this.createTime;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	
	public String getDesc() {
		return this.desc;
	}
	public void setId(String id) {
		this.id = id;
	}
	
	public String getId() {
		return this.id;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public String getName() {
		return this.name;
	}

	
    
    @Override
    public String toString() {
        return "Role{" +
		"createTime=" + createTime +
		",desc='" + desc + "'" + 
		",id='" + id + "'" + 
		",name='" + name + "'" + 
                '}';
    }
	
}